Features targeted for JDK 24 include warnings about the use of JNI, improvements to the G1 garbage collector, and the finalization of a class-file API. This article discusses these features and other potential additions to the Java development kit.
Class File API:
Finalized API for parsing, generating, and transforming Java class files, replacing internal copies of third-party libraries. |
Late Barrier Expansion for G1 Garbage Collector:
Simplification of the implementation of G1’s barriers by moving their expansion to a later stage in the C2 compilation pipeline. Aims to reduce C2 compilation time and improve barrier comprehensibility.
JNI Usage Warnings:
Addition of warnings about the use of JNI to prepare for future restrictions. Adjustments to the Foreign Function and Memory (FFM) API to issue warnings in a consistent manner.
Potential Future Features:
Stream gatherers, module import declarations, structured concurrency, scoped values, flexible constructor bodies, primitive types in patterns, instanceof, and switch, vector API, ahead-of-time class loading, and string templates.
Adoption:
Likely lower than LTS releases like JDK 21 and the upcoming JDK 25 due to the LTS preference among Java users.